<h3>模板驱动式表单</h3>
<form #_frmLogin="ngForm" (ngSubmit)="onSubmitForm(_frmLogin.value)">
    <div class="form-group">
        <label for="name">姓名：</label>
        <input type="text" class="form-control" name="name" placeholder="请输入姓名" [(ngModel)]="_name" required />
    </div>
    <div class="form-group">
        <label for="password">密码：</label>
        <input type="password" class="form-control" name="password" placeholder="请输密码" [(ngModel)]="_pass" required />
    </div>
    <div class="form-group">
        <label>时间：</label>
        <div class="form-check">
            <label class="form-check-label">
                <input type="radio" class="form-check-input" name="time" value="12pm" [(ngModel)]="_time" required /> 12pm
            </label>
        </div>
        <div class="form-check">
            <label class="form-check-label">
                <input type="radio" class="form-check-input" name="time" value="2pm" [(ngModel)]="_time" required /> 2pm
            </label>
        </div>
        <div class="form-check">
            <label class="form-check-label">
                <input type="radio" class="form-check-input" name="time" value="4pm" [(ngModel)]="_time" required /> 4pm
            </label>
        </div>
    </div>
    <div class="form-group">
        <label for="addr">地点:</label>
        <textarea class="form-control" name="addr" rows="3" [(ngModel)]="_addr" required></textarea>
    </div>
    <div class="form-group">
        <input type="submit" class="btn btn-primary" [disabled]="!_frmLogin.valid" value="提交" />
        <input type="reset" class="btn" value="取消" />
    </div>
    <div class="checked" *ngIf="!_frmLogin.valid">
        <p>是否完整：
            <span>{{_frmLogin.valid}}</span>
        </p>
        <p>表单数据：
            <span>{{_frmLogin.value | json}}</span>
        </p>
    </div>
    <div class="checked" *ngIf="_frmLogin.valid">
        <p>{{_tips}}</p>
    </div>
</form>